{# cases/templates/cases/edit.html #}
{% extends "base/base.html" %}
{% load static %}
{% block content %}
    <div class="container mt-4">
        <h2>编辑用例: {{ case.name }}</h2>

        <!-- 协议选择 -->
        <div class="mb-3">
            <label class="form-label">协议类型</label>
            <select class="form-select protocol-select">
                {% for protocol in protocol_choices %}
                    <option value="{{ protocol|lower }}">{{ protocol }}</option>
                {% endfor %}
            </select>
        </div>

        <!-- 动态协议配置区域 -->
        <div id="protocolConfig"></div>

        <!-- 操作按钮 -->
        <div class="mt-4">
            <button class="btn btn-primary" id="saveCase">
                <i class="bi bi-save"></i> 保存修改
            </button>
        </div>
    </div>
{% endblock %}

{% block scripts %}
    <script src="{% static 'cases/js/case_edit.js' %}"></script>
{% endblock %}